home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
22
/
4
/
DISK2247.ZIP
/
CBASE101.ZIP
/
BLKIO112.ZIP
/
BEXIT.C
< prev
next >
Wrap
Text File
|
1990-06-20
|
1KB
|
48 lines
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "@(#)bexit.c 1.4 - 90/06/20" */
/* ansi headers */
#include <errno.h>
/*#include <stdlib.h>*/
/* local headers */
#include "blkio_.h"
/*man---------------------------------------------------------------------------
NAME
bexit - block file exit
SYNOPSIS
#include <blkio.h>
void bexit(status)
int status;
DESCRIPTION
The bexit function is for use with the blkio library in place of
exit. It closes all open block files, which writes the contents
of the buffers to the files, then calls exit.
SEE ALSO
bclose.
------------------------------------------------------------------------------*/
void bexit(status)
int status;
{
BLKFILE *bp = NULL;
/* close all open block files */
for (bp = biob; bp < (biob + BOPEN_MAX); ++bp) {
if (bp->flags & BIOOPEN) {
if (bclose(bp) == -1) {
BEPRINT;
}
}
}
exit(status);
}